import request from '@/utils/request'

/**
 * 分页查询数据相关信息
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllByPager(params) {
  return request({
    url: 'rest/config/api/sys',
    method: 'get',
    params
  })
}

/**
 * 保存数据信息
 * @param data
 * @returns {AxiosPromise}
 */
export function saveOrUpdateObject(data) {
  return request({
    url: 'rest/config/api/sys',
    method: 'post',
    data
  })
}

/**
 * 删除数据项
 * @param data
 * @returns {AxiosPromise}
 */
export function deleteObject(data) {
  return request({
    url: 'rest/config/api/sys/del',
    method: 'post',
    data
  })
}

export function queryAllSjx(params) {
  return request({
    url: 'rest/config/api/sys/layz',
    method: 'get',
    params
  })
}

/**
 * 测试数据项
 * @param data
 * @returns {AxiosPromise}
 */
export function analysisEntity(data) {
  return request({
    url: 'rest/config/api/sys/analysis',
    method: 'post',
    data
  })
}

/**
 * 查询配置项详情
 * @param params
 * @returns {AxiosPromise}
 */
export function queryEntity(params) {
  return request({
    url: 'rest/config/api/sys/entity',
    method: 'get',
    params
  })
}
